package com.itzhoun;

/**
 * @author 周楠
 * @Date 2023/01/21/下午 9:17
 */
public class Computer {

    private CPU cpu;
    private Memory memory;
    private Disk disk;

    public Computer() {
        cpu = new CPU();
        memory = new Memory();
        disk = new Disk();
    }

    public void start(){
        System.out.println("computer is start");
        cpu.start();
        disk.start();
        memory.start();
        System.out.println("computer start end");
    }

    public void shutdown(){
        System.out.println("computer is shutdown");
        cpu.shutdown();
        disk.shutdown();
        memory.shutdown();
        System.out.println("computer shutdown end");
    }
}
